package com.anyou.mall.goo.goodsComment.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.goo.goodsComment.mapper.GooGoodsCommentAddMapper;
import com.anyou.mall.goo.goodsComment.domain.GooGoodsCommentAdd;
import com.anyou.mall.goo.goodsComment.service.IGooGoodsCommentAddService;

/**
 * 商品评论追加Service业务层处理
 *
 * @author xiaq
 * @date 2022-04-11
 */
@Service
public class GooGoodsCommentAddServiceImpl implements IGooGoodsCommentAddService
{
    @Autowired
    private GooGoodsCommentAddMapper gooGoodsCommentAddMapper;

    /**
     * 查询商品评论追加
     *
     * @param goodsCommentAddId 商品评论追加主键
     * @return 商品评论追加
     */
    @Override
    public GooGoodsCommentAdd selectGooGoodsCommentAddByGoodsCommentAddId(Long goodsCommentAddId)
    {
        return gooGoodsCommentAddMapper.selectGooGoodsCommentAddByGoodsCommentAddId(goodsCommentAddId);
    }

    /**
     * 查询商品评论追加列表
     *
     * @param gooGoodsCommentAdd 商品评论追加
     * @return 商品评论追加
     */
    @Override
    public List<GooGoodsCommentAdd> selectGooGoodsCommentAddList(GooGoodsCommentAdd gooGoodsCommentAdd)
    {
        return gooGoodsCommentAddMapper.selectGooGoodsCommentAddList(gooGoodsCommentAdd);
    }

    /**
     * 新增商品评论追加
     *
     * @param gooGoodsCommentAdd 商品评论追加
     * @return 结果
     */
    @Override
    public int insertGooGoodsCommentAdd(GooGoodsCommentAdd gooGoodsCommentAdd)
    {
        /*gooGoodsCommentAdd.setCreateTime(DateUtils.getNowDate());*/
        return gooGoodsCommentAddMapper.insertGooGoodsCommentAdd(gooGoodsCommentAdd);
    }

    /**
     * 修改商品评论追加
     *
     * @param gooGoodsCommentAdd 商品评论追加
     * @return 结果
     */
    @Override
    public int updateGooGoodsCommentAdd(GooGoodsCommentAdd gooGoodsCommentAdd)
    {
        return gooGoodsCommentAddMapper.updateGooGoodsCommentAdd(gooGoodsCommentAdd);
    }

    /**
     * 批量删除商品评论追加
     *
     * @param goodsCommentAddIds 需要删除的商品评论追加主键
     * @return 结果
     */
    @Override
    public int deleteGooGoodsCommentAddByGoodsCommentAddIds(Long[] goodsCommentAddIds)
    {
        return gooGoodsCommentAddMapper.deleteGooGoodsCommentAddByGoodsCommentAddIds(goodsCommentAddIds);
    }

    /**
     * 删除商品评论追加信息
     *
     * @param goodsCommentAddId 商品评论追加主键
     * @return 结果
     */
    @Override
    public int deleteGooGoodsCommentAddByGoodsCommentAddId(Long goodsCommentAddId)
    {
        return gooGoodsCommentAddMapper.deleteGooGoodsCommentAddByGoodsCommentAddId(goodsCommentAddId);
    }
}
